import Config from '~/config';
import axios from 'axios';

let {
  SSO,
} = Config;

window.onbeforeunload = async function (event) {
  if ((event.clientX > document.body.clientWidth && event.clientY < 0) || event.altKey) {
    event.returnValue = '您已经退出乐速平台系统！';
    await axios.post(SSO.ssoLogout);
  }
};
